<div class="row">
    <div class="col-sm-4 col-md-3">
        <div class="thumbnail">
            <img src="resource/preview/thmes/default/1.png" >
            <div class="caption">
                <neq name="ap[app_apicloud_theme]" value="default">
                <a data-theme="default" href="#" class="btn btn-primary btn-block" >使用该主题</a>
                <else/>
                    <a href="#" class="btn btn-info btn-block" >当前主题</a>
                </neq>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
$(function(){
    $('[data-theme]').on('click',function(e){
        e.preventDefault();
        var theme = $(this).attr('data-theme');
        var url = "{:U("ApiColud/style?apid=$apid")}"
        $.get(url,{theme:theme},function(req){
            window.location.reload(true);
        })
    })
})    
</script>